package cloud
{
	import flash.display.Sprite;
	import flash.events.MouseEvent;
	import flash.text.TextField;
	import flash.text.TextFieldAutoSize;
	import flash.text.TextFormat;
	
	public class LabelSprite extends Sprite {

		private var _tf:TextField;
		
		public function LabelSprite( label:String ){
			
			var _tf:TextField = new TextField();
			_tf.autoSize = TextFieldAutoSize.LEFT;
			_tf.selectable = false;
			// set styles
			var format:TextFormat = new TextFormat();
			format.font = "Dotum";
			format.bold = true;
			format.color = "0xffffff";
			format.size = ((8*300)/90);
			_tf.defaultTextFormat = format;
			_tf.embedFonts = false;
			// set text
			_tf.text = label;
			addChild(_tf);
		}
		
		public function updateTextForm(scaleX:Number):void {
			
			var format:TextFormat = new TextFormat();
			format.font = "Dotum";
			format.bold = true;
			format.color = "0xffffff";
			format.size = ((8*scaleX)/90);
			
			_tf.setTextFormat(format);
		}
		
		
	}

}
